<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<title>移动合同查询</title>
<jsp:include page="../inc.jsp"></jsp:include>
<script type="text/javascript">
	var dataGrid;
	var YDHTBIDSTR = null;
	$(function() {
		dataGrid = $('#dataGrid').datagrid({
			url : '${pageContext.request.contextPath}/seachController/ydhtSeach',
			fit : true,
			border : false,
			pagination : true,
		 	queryParams: $.serializeObject($('#searchForm')),
			idField : 'id',
			pageSize : 10,
			pageList : [ 10, 20, 30, 40, 50 ],
			sortName : 'CREATEDATE',
			sortOrder : 'desc',
			checkOnSelect : false,
			selectOnCheck : false,
			nowrap : false,
			striped : true,
			rownumbers : true,
			singleSelect : true,
			frozenColumns: [[
			{
				field : 'GCMCSTR',
				title : '工程名称',
				width : 200,
				sortable : true
			} ]],
			columns : [ [{
				field : 'ID',
				title : '编号',
				width : 150,
				hidden : true
			},{
				field : 'DQBM',
				title : '地区编码',
				width : 80,
				sortable : true
			} , {
				field : 'DDHTBHSTR',
				title : '订单合同编号',
				width : 150,
				sortable : true
			}, {
				field : 'HTLXSTR',
				title : '工程类型',
				width : 150,
				sortable : true
			}, {
				field : 'FBFSTR',
				title : '发包方（甲方）',
				width : 150,
				sortable : true
			}, {
				field : 'CBFSTR',
				title : '承包方（乙方',
				width : 150,
				sortable : true
			}, {
				field : 'QDRQDATE',
				title : '签订日期',
				width : 150,
				sortable : true
			}, {
				field : 'JFKJHTBHSTR',
				title : '甲方框架合同编号',
				width : 150,
				sortable : true
			},{
				field : 'KGRQDATE',
				title : '开工日期',
				width : 150,
				sortable : true
			},{
				field : 'JGRQDATE',
				title : '交工日期',
				width : 150,
				sortable : true
			}, {
				field : 'ZRLRSNUM',
				title : '总日历日数',
				width : 150,
				sortable : true
			}, {
				field : 'JFDBSTR',
				title : '甲方代表',
				width : 150,
				sortable : true
			},{
				field : 'YFDBSTR',
				title : '乙方代表（项目经理）',
				width : 150,
				sortable : true
			},{
				field : 'DDHTGCYSJNUM',
				title : '订单工程合同预算价',
				width : 150,
				sortable : true
			},{
				field : 'XMBHSTR',
				title : '项目编号',
				width : 150,
				sortable : true
			},{
				field : 'FBHTBHSTR',
				title : '分包合同编号',
				width : 200,
				sortable : true
			}] ],
			toolbar : '#toolbar',
			onBeforeLoad:function(){
				console.info(this);
			},
			onLoadSuccess : function() {
				$('#searchForm table').show();
				parent.$.messager.progress('close');

				$(this).datagrid('tooltip');
			}
	});
	

	$('#cc').combobox({
		url:'${pageContext.request.contextPath}/seachController/dqbmSeach',
		valueField:'QYBMSTR',
		textField:'QYMCSTR'
	});
});	
function searchFun() {
		dataGrid.datagrid('load', $.serializeObject($('#searchForm')));
	}
function cleanFun() {
		$('#searchForm input').val('');
		dataGrid.datagrid('load', {});
	}
</script>
</head>
<body>
<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',title:'查询条件',border:false" style="height: 60px; overflow: hidden;">
			<form id="searchForm">
				<table class="table table-hover table-condensed" style="display: none;">
					<tr>
						<th><div align="right">工程名称</div></th>
						<td><input name="GCMCSTR_CONTAINS" placeholder="可以模糊查询" class="span2" /></td>
						<th>地区编码</th>
						<td>
							<select id="cc" class="easyui-combobox" name="cxbm" style="width:217px;">
								
							</select>
						</td>
						<th><div align="right">创建时间</div></th>
						<td colspan="3"><input class="span2" name="CREATEDATE_START" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" />至<input class="span2" name="CREATEDATE_END" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" /></td>
					</tr>
				</table>
			</form>
		</div>
		<div data-options="region:'center',border:false">
			<table id="dataGrid"></table>
		</div>
	</div>
	<div id="toolbar" style="display: none;">
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'brick_add',plain:true" onclick="searchFun();">过滤条件</a><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'brick_delete',plain:true" onclick="cleanFun();">清空条件</a>
	</div>
</body>
</html>